import * as mongoose from 'mongoose';
import db from './../core/lib/db/mongodb';

let sysMenuSchema: mongoose.Schema = new mongoose.Schema(
    {
      nId :Number ,       //
      pId :Number ,       //
      name :String ,      //
      menuCode :String,   //菜单编码
      icon :String,       //图标
      url :String,        //链接地址
      orderNo :Number,    //排序
      enable : Number,    //0启用 1禁用
      createDate :Number, //创建时间  
    }, { collection: 'sys_menu' });
export interface SysMenu extends mongoose.Document {
    nId :number ;
    pId :number ;
    name : string;
    menuCode :string ;
    icon :string ;
    url :string ;
    orderNo :number ;
    enable :number ;
    createDate :number ;
}
export let menuModel = db.model<SysMenu>('sys_menu', sysMenuSchema);
